package cool.taomu.toolkit.jooq

import org.jooq.DSLContext

class ThreadLocalDSLContext {
    static val threadLocalContext = new ThreadLocal<DSLContext>();

    def static void set(DSLContext context) {
        threadLocalContext.set(context);
    }

    def static DSLContext get() {
        return threadLocalContext.get();
    }

    def static void clear() {
        threadLocalContext.remove();
    }
}
